package cn.com.oceansoft.osc.ms.schedule;

import cn.com.oceansoft.osc.ms.persistence.ICallPoliceMapper;
import cn.com.oceansoft.osc.ms.schedule.entity.*;
import cn.com.oceansoft.osc.ms.schedule.service.CallPoliceComno;
import cn.com.oceansoft.osc.ms.schedule.service.CallPoliceService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;

/**
 * @author wuzy
 * @created 2017-03-14-10:32
 * @email wzy@oceansoft.com.cn
 */
@Component
public class ScheduleRun {

    @Scheduled(cron = "0/10 * * * * ? ")
    public void executeCallPoliceTask() throws Exception {
        String cmd = "cmd /c start C:/Users/caobo/Desktop/225-153-oi.ffs_batch";
        try {
            Process ps = Runtime.getRuntime().exec(cmd);
            System.out.println(ps.getInputStream());
        } catch (IOException ioe) {
            ioe.printStackTrace();
        }

        String cmd1 = "cmd /c start C:/Users/caobo/Desktop/153-225-io.ffs_batch";
        try {
            Process ps = Runtime.getRuntime().exec(cmd1);
            System.out.println(ps.getInputStream());
        } catch (IOException ioe) {
            ioe.printStackTrace();
        }
    }
}

